#ifndef __DBG_PRT_MACRO__ 
#define __DBG_PRT_MACRO__ 

#ifdef DBG_UART_PRT
#define dbg_file_line(msg...)\
    do{\
        { \
            printf(" %s:%s:%d;",__FILE__,__func__,__LINE__);\
            printf(msg);\
            printf(" \n");\
        } \
    }while(0)

#else
    #define dbg_file_line(fmt, ...)
#endif

#ifdef DBG_UART_PRT
#define dbg_prt(msg...)\
    do{\
        { \
            printf(msg);\
        } \
    }while(0)
#else
    #define dbg_prt(fmt, ...)
#endif

#ifdef DBG_UART_PRT
#define dbg_rn_prt(msg...)\
    do{\
        { \
            printf(msg);\
            printf(" \n");\
        } \
    }while(0)
#else
    #define dbg_rn_prt(fmt, ...)
#endif

#ifdef DBG_UART_PRT
#define dbg_hex_line(num,buf)\
    do{\
		printf("%s:%s:%d;\ndbg_hex_line=",__FILE__,__func__,__LINE__);\
		for(int i=0;i<(num);++i)\
		{\
			printf("%02X ",buf[i]);\
		}\
		printf(" \n");\
	}while(0)
#else
    #define dbg_hex_line(num,buf)
#endif

#ifdef DBG_UART_PRT
#define dbg_hex_send(num,buf)\
    do{\
		printf("send;%08d:",num);\
		for(int i=0;i<(num);++i)\
		{\
			printf("%02X ",buf[i]);\
		}\
		printf(" \n");\
	}while(0)
#else
    #define dbg_hex_send(num,buf)
#endif

#ifdef DBG_UART_PRT
#define dbg_hex_recv(num,buf)\
    do{\
		printf("recv;%08d:",num);\
		for(int i=0;i<(num);++i)\
		{\
			printf("%02X ",buf[i]);\
		}\
		printf(" \n");\
	}while(0)
#else
    #define dbg_hex_recv(num,buf)
#endif

#endif
 


